//
//  CJPlayPageHeader.m
//  CoJellyCartoon
//
//  Created by dllo on 16/4/5.
//  Copyright © 2016年 CJG. All rights reserved.
//

#import "CJPlayPageHeader.h"

@implementation CJPlayPageHeader


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        NSArray *title = @[@"简介",@"评论"];
        self.changeContent = [[UISegmentedControl alloc] initWithItems:title];
        self.changeContent.frame = CGRectMake(0, 0, self.bounds.size.width/3, 44);
        self.changeContent.selectedSegmentIndex = 0;
        self.changeContent.tintColor = [UIColor clearColor];
        
        NSDictionary *dicOne = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:16],NSForegroundColorAttributeName:[UIColor colorWithRed:1.000 green:0.701 blue:0.267 alpha:1.000]};
        
        [self.changeContent setTitleTextAttributes:dicOne forState:UIControlStateNormal];
        
        NSDictionary *dicTwo = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor colorWithRed:1.000 green:0.378 blue:0.089 alpha:1.000]};
        
        
        [self.changeContent setTitleTextAttributes:dicTwo forState:UIControlStateSelected];
        
        [self addSubview:self.changeContent];
        
    }
    return self;
}
@end
